package com.jinzhi.jinzhidata.dataobject;

import lombok.Data;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.LastModifiedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import javax.persistence.Entity;
import javax.persistence.EntityListeners;
import javax.persistence.Id;
import java.util.Date;

@Data
@EntityListeners(AuditingEntityListener.class)
@Entity
public class Article {

    //文章ID
    @Id
    private String articleId;

    //文章类型
    private String articleTypeId;

    //文章标题
    private String articleTitle;

    //文章封面
    private String articleCover;

    //文章作者
    private String articleAuthorId;

    //文章介绍
    private String articleIntroduction;

    //文章内容id
    private String articleContentId;

    //文章状态
    private String articleState;

    //点赞数
    private Integer articleLikeNum;

    @CreatedDate
    private Date createTime;

    @LastModifiedDate
    private Date updateTime;

}

